﻿using Apps.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.DAL.HC
{
    public partial class HC_ITEM_EXTEND_REL_Repository : DbContext<HC_ITEM_EXTEND_REL>
    {
        public bool IsHaveRel(string fileId)
        {
            return Db.Queryable<HC_ITEM_EXTEND_REL>().Where(it => it.EXTEND_FIELD_ID == fileId).Any();
        }
        public List<HC_ITEM_EXTEND_REL> GetList(string fileId)
        {
            return Db.Queryable<HC_ITEM_EXTEND_REL>().Where(it => it.ITEM_ID == fileId).ToList();
        }
    }
}
